﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;

namespace WorldRacing2
{
    [ExportMetadata("Name", "World Racing 2")]
    [ExportMetadata("Version", 1)]
    [Export(typeof(Scenario_Editor.AddinManager.IAddinScenarioEditor))]
    partial class GameDllScenarioEditor
    {
        #region Private Fields

        private Engine.Engine _engine;
        private List<Material.MaterialEditUI> _materialEditControl;
        private WorldRacing2.WindowsFormsControls.TerrainMaterialBrush _terrainPaintingControl;
        private Configuration.WR2ConfigurationDialog configurationDialog;
        private object materialManager;
        private Toolstrips.TerrainToolstrip terrainToolstrip;

        #endregion Private Fields

        #region Public Constructors

        [ImportingConstructor]
        public GameDllScenarioEditor([Import("MainEngine")]Engine.Engine engine)
        {
            this._engine = engine;

            this._terrainPaintingControl = new WindowsFormsControls.TerrainMaterialBrush(this);
            this._materialEditControl = new List<Material.MaterialEditUI>();
            this.configurationDialog = new Configuration.WR2ConfigurationDialog();
            this.terrainToolstrip = new Toolstrips.TerrainToolstrip();
        }

        #endregion Public Constructors

        #region Public Properties

        public Scenario_Editor.Tools.ITerrain Terrain { get; private set; }

        #endregion Public Properties

        #region Private Methods

        /// <summary>
        /// Open the Configuartion Window.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Configuration_Click(object sender, EventArgs e)
        {
            this.configurationDialog.ShowDialog();
        }

        #endregion Private Methods
    }
}